
static inline struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
                                                           unsigned long *flags)
{
    struct hrtimer_clock_base *base = timer->base;

    raw_spin_lock_irqsave(&base->cpu_base->lock, *flags);

    return base;
}

/*
 * Counterpart to lock_hrtimer_base above:
 */
static inline void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
{
    raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags);
}
